In data processing systems,.such as those defined in accordance with the Enterprise Systems Architecture/390 (ESA/390) offered by International Business Machines Corporation and similar architectures, an input/output operation is executed by decoding and executing one or more channel command words. Each channel command word is decoded and executed by a channel subsystem and an input/output device. One or more channel command words arranged for sequential execution form a channel program and are executed as one or more I/O operations, respectively. Execution of channel programs is controlled by, for instance, suspend and resume functions.
Currently, suspension of a channel program is initiated by the setting of a suspend control bit in a particular control block known as an operation request block. This information is then made available to the channel subsystem. The suspend function is signaled to the channel subsystem during channel program execution by specifying a suspend flag in one of the channel command words within the channel program. Suspension occurs when the channel subsystem fetches a channel command word with a valid suspend flag. The command in this channel command word is not sent to the input/output device, and the device is signaled that the chain of commands is concluded and the input/output operation is complete.
A subsequent RESUME SUBCHANNEL instruction informs the channel subsystem that the channel command word that caused suspension may have been modified and that the channel subsystem must refetch the channel command word and examine the current setting of the suspend flag. If the suspend flag is found not to be specified in the channel command word, the channel subsystem resumes execution of the chain of commands with the input/output device.
The ESA/390 suspend function described above provides for clean suspension of input/output operations only under the control of the same channel program. Thus, long running channel programs are less controllable by the operating system and in particular, the input/output supervisor located within the operating system. This forces the designer of the channel program to draw a balance between the risks of monopolizing the system's input/output resources and the efficiency gained from a long channel program. Further, the suspend function described above requires a previous determination of when the suspend is to occur. That is, the suspend bit must be turned on in the channel command word to be suspended. Additionally, the suspend and resume mechanisms described above do not provide for automatic suspension of a channel program a certain event occurs or for automatic resumption of the channel program after a certain amount of time. Yet further, the above-described suspend mechanism does not provide for issuance of a suspend function from a subchannel other than the one executing its own channel program.
In systems other than the Enterprise Systems Architecture/390, such as in the Small Computer Systems Interface (SCSI) I/O Architecture, I/O operations may be packaged into the equivalent of channel programs. In one example, commands are individual I/O requests passed on to the I/O subsystem. In another example, a single command operates on multiple data addresses, similar to data chaining in ESA/390, by using additional pointers. This is referred to as scatter/gather because of the ability of this function to use multiple distinct memory buffers in one I/O operation. In another example, linked SCSI commands which are similar to command chaining in ESA/390 Architecture is provided. As another example, a queue of I/O requests accumulates in a mailbox associated with the I/O device or with the channel I/O subsystem.
The SCSI Architecture is described in detail in Small Computer System Interface-2 (SCSI-2), IEEE X3T9 2/86 109, Oct. 17, 1991, which is incorporated herein by reference in its entirety. In the SCSI Architecture, there are a number of capabilities for stopping or suspending I/O operations. In one example, there is a Terminate I/O Process (TIPS) message. While the transfer is in progress between an initiator and a target, the initiator can send a MESSAGE to the target requesting "Terminate I/O Process." Upon receipt of this message, data transfer will cease, and the operation will be terminated gracefully with all byte counts being adjusted to reflect the correct state, as it was at the time of termination. Another capability includes a Target Transfer Disable (TTD) message. The TTD message is sent from an initiator to the target to request that subsequent reconnections for the data transfer on the I/O operation be done by the initiator, instead of the target. That is, as opposed to normal processing in which I/O devices and control units request reconnections to channels when disconnected, independent activity is complete, and the device/target is ready for the data transfer, TTD allows the initiator to choose the time when such data transfer will occur. In another example, a Continue I/O Process (CIP) message is provided. The CIP message is sent from an initiator to the target as a request to reconnect to an I/O process.
While the TIP, TTD and CIP messages provide for a means for requesting graceful but immediate termination of an I/O operation, or prevention of reconnection at certain times, they do not allow the initiator to request suspension in the middle of a transfer, in a manner that enables resumption. None of the SCSI messages offers a method in which the target can automatically reconnect after being disconnected (and suspended) for a duration specified by the initiator. None of the SCSI messages offers an interface between a control program and the initiator which allows structured program control over limits, suspensions and resumptions. In addition, TIP and TTD are immediate. They either terminate the current transfer (TIP) or prevent the very next and subsequent reconnections (TTD). TIP and TTD offer no means to allow a current operation, which includes transfer of data, to continue and then be suspended automatically when certain limits are reached.
Based on the foregoing, there still exists a need for control mechanisms which can suspend execution of I/O operations when a predefined limit is reached. Also, mechanisms for resuming execution are needed.